package com.geping.etl.common.controller;


import com.geping.etl.common.entity.Report_Info;
import com.geping.etl.common.service.SysUserReportService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/***
 *  用户报表
 * @author liang.xu
 * @date 2024.5.14
 */
@RestController
@Slf4j
public class Sys_UserReportController {

    @Autowired
    private SysUserReportService sysUserReportService;

    /**
     * 手工补录-用户报表（当前登录用户）
     *
     * @param request
     * @return
     */
    @RequestMapping(value = "/queryUserReport", method = RequestMethod.GET)
    public List<Report_Info> queryUserReport(HttpServletRequest request) {
        return sysUserReportService.queryUserReport(request);
    }

    /**
     * 手工补录-用户报表(根据用户ID)
     *
     * @param request
     * @return
     */
    @RequestMapping(value = "/queryUserReportById", method = RequestMethod.GET)
    public List<Report_Info> queryUserReportById(HttpServletRequest request, Integer userId) {
        return sysUserReportService.queryUserReportById(request, userId);
    }
}
